package com.huadao.pda.main;


import com.huadao.pda.base.BaseApplication;
import com.huadao.pda.data.bean.DeviceInfo;

public class PdaApplication extends BaseApplication {
    private static PdaApplication ourInstance;
    private DeviceInfo deviceInfo;
    private String token;
    private String userName;

    public static PdaApplication getInstance() {
        return ourInstance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        ourInstance=this;
    }

    public void setDeviceInfo(DeviceInfo deviceInfo) {
        this.deviceInfo=deviceInfo;
    }

    public DeviceInfo getDeviceInfo() {
        return deviceInfo;
    }

    //主键ID
    public String getDevKeyId() {
        if(deviceInfo!=null){
            return deviceInfo.getId();
        }
        return "";
    }

    public String getToken() {
        if(token==null){
            return "";
        }
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public void setUserName(String user) {
        this.userName=user;
    }

    public String getUserName() {
        return userName;
    }
}
